Intro

This just shows a brief example of how you can start a game and trigger turns to progress.

library(MundusCentrum)

Setup the game

game <- new_game(
  name = "Anno Duo",
  players = list(
    list(
      name = "Big Grizz",
      team = "Dark Angels",
      units = system.file("extdata", "unit-templates", "big_grizz.csv", package = "MundusCentrum")
    ),
    list(
      name = "Eric",
      team = "Necrons",
      units = system.file("extdata", "unit-templates", "eric.csv", package = "MundusCentrum")
    ),
    list(
      name = "Chris",
      team = "Tyranids",
      units = system.file("extdata", "unit-templates", "chris.csv", package = "MundusCentrum")
    )
  ),
  points = 3000
)
## All units resolved.
str(game)
## List of 2
##  $ players:List of 4
##   ..$ GLOBAL   : chr "5876c21da7c7ed655435a15b696b0df3"
##   ..$ big_grizz: chr "524823c4b61c14cfef42e01282f8b166"
##   ..$ eric     : chr "843dfe138bb3f197a786d119a0f6a768"
##   ..$ chris    : chr "a4bfa664300d74aa19710d2bd9bf2628"
##  $ map_df : tibble [76 × 6] (S3: tbl_df/tbl/data.frame)
##   ..$ player   : chr [1:76] "big_grizz" "big_grizz" "big_grizz" "big_grizz" ...
##   ..$ loc      : chr [1:76] "D4" "D4" "D4" "D4" ...
##   ..$ unit_id  : int [1:76] 1 2 3 4 5 6 7 8 9 10 ...
##   ..$ unit_type: chr [1:76] "ravenwing_talonmaster" "deathwing_captain" "techmarine" "phobos_librarian" ...
##   ..$ action   : chr [1:76] "control" "control" "control" "control" ...
##   ..$ unit_name: chr [1:76] "Elizabeth Taylor" "Jean Sassoon" "Ashley Bates" "Steve Lillywhite" ...

see the starting point

This is the state of the game at the beginning

print(draw_map(game))

knitr::kable(get_map_df(game))
player loc unit_id unit_type action unit_name
big_grizz D4 1 ravenwing_talonmaster control Elizabeth Taylor
big_grizz D4 2 deathwing_captain control Jean Sassoon
big_grizz D4 3 techmarine control Ashley Bates
big_grizz D4 4 phobos_librarian control Steve Lillywhite
big_grizz D4 5 tactical_squad control Nathan Kelley
big_grizz D4 6 tactical_squad control Ethan Ortiz
big_grizz D4 7 tactical_squad control Jesse Estrada
big_grizz D4 8 tactical_squad control Ian Joseph
big_grizz D4 9 infiltrators control Logan Tucker
big_grizz D4 10 ravenwing_bike_squad control Benedict Cumberbatch
big_grizz D4 11 ravenwing_attack_bike control Richard Burton
big_grizz D4 12 ravenwing_attack_bike control Paul Bettany
big_grizz D4 13 dreadnought control Rose Jimenez
big_grizz D4 14 redemptor_dreadnought control Brian Weaver
big_grizz D4 15 invictor_tactical_warsuit control The Neptunes
big_grizz D4 16 ravenwing_apothecary control Scarlett Johansson
big_grizz D4 17 deathwing_terminators control Thomas Hobbes
big_grizz D4 18 deathwing_knights control Frederick Forsyth
big_grizz D4 19 vindicare_assassin control John Hill
big_grizz D4 20 eliminators control Max Martin
big_grizz D4 21 eradicators control Jack Armstrong
big_grizz D4 22 storm_raven control Method Bastard
big_grizz D4 23 rhino control Gwyneth Paltrow
eric G7 1 trazyn_the_infinite control Alexis Ramirez
eric G7 2 illuminor_szeras control Sophie Burke
eric G7 3 technomancer control Georges Bataille
eric G7 4 lychgaurd control Nicholas Nelson
eric G7 5 skorpekh_destroyers control Diego Norman
eric G7 6 canoptek_plasmacyte control Profound Wizard
eric G7 7 immortals control Emily Graham
eric G7 8 canoptek_spyders control Ol’ Dirty Wanderer
eric G7 9 canoptek_spyders control Crazy Dreamer
eric G7 10 cryptothralls control Kenneth Hernandez
eric G7 11 cryptothralls control Natalia Berry
eric G7 12 canoptek_scarab_swarms control Will Smith
eric G7 13 canoptek_wraiths control Frank Sinatra
eric G7 14 deathmarks control Jimmy Jam & Terry Lewis
eric G7 15 night_scythe control Vin Diesel Weber
eric G7 16 overlord control Maddox Byrd
eric G7 17 royal_warden control Hayden Ellis
eric G7 18 necron_warriors control David Ray
eric G7 19 immortals control Aubrey Doyle
eric G7 20 canoptek_scarab_swarms control Wicked Madman
eric G7 21 canoptek_scarab_swarms control William Holden
eric G7 22 night_scythe control H G Wells Williamson
eric G7 23 overlord control Joel Johnson
eric G7 24 royal_warden control Gabriella Vargas
eric G7 25 immortals control Isabelle Dominguez
eric G7 26 necron_warriors control Lyla Bennett
eric G7 27 canoptek_scarab_swarms control Vulgar Swami
eric G7 28 canoptek_scarab_swarms control Gregory Peck
chris A5 1 flying_hive_tryant control Mighty Dominator
chris A5 2 flying_hive_tryant control Sarkastik Warrior
chris A5 3 broodlord control Jack Antonoff
chris A5 4 broodlord control Stevie Wonder
chris A5 5 neurothrope control Gentlemen Assassin
chris A5 6 tyranid_warriors control Camila Huang
chris A5 7 tyranid_warriors control Jake Hall
chris A5 8 tyranid_warriors control Reagan Castillo
chris A5 9 genestealers control Amir Little
chris A5 10 genestealers control Michael Fine
chris A5 11 termagants control Alice Silva
chris A5 12 hormagaunts control Quinn Parker
chris A5 13 ripper_swarms control Jim Corbett
chris A5 14 ripper_swarms control Sofia Santos
chris A5 15 ripper_swarms control Lila Sutton
chris A5 16 hive_guard control Ellie Long
chris A5 17 maleceptor control Thomas Marquez
chris A5 18 venomthropes control Aurora Bishop
chris A5 19 raveners control Karl Barth
chris A5 20 gargoyles control Gilles Deleuze
chris A5 21 gargoyles control Chris Evans
chris A5 22 exocrine control Tyler Bell
chris A5 23 biovores control Allison Chavez
chris A5 24 biovores control Mark Sims
chris A5 25 tyrannocyte control Samuel Huntington Hicks

Turn play

Get a list of unit ID’s to easily make the modify_unit() calls below.

moby_units <- get_player_map(game, "big_grizz") %>% pull(unit_name)
eric_units <- get_player_map(game, "eric") %>% pull(unit_name)
chris_units <- get_player_map(game, "chris") %>% pull(unit_name)

TURN 1

Players change their maps (making orders)

game <- game %>%
  modify_unit("big_grizz", moby_units[1],   "move",  "C2") %>%
  modify_unit("big_grizz", moby_units[c(2, 7, 17, 18)],   "control",  "D4") %>%
  modify_unit("big_grizz", moby_units[c(3, 5:6, 13, 22)],   "soar",  "H2") %>% # transport
  modify_unit("big_grizz", moby_units[c(8, 23)],   "move",  "C5") %>% # transport
  modify_unit("big_grizz", moby_units[9],   "move",  "F5") %>%
  modify_unit("big_grizz", moby_units[c(10:12, 16)],   "move",  "D1") %>%
  modify_unit("big_grizz", moby_units[c(14:15, 19:21)],   "move",  "F5") %>%
  modify_unit("eric",      eric_units[c(1:6, 13:14, 8:11)],   "move",  "E7") %>%
  modify_unit("eric",      eric_units[7],     "control","G7") %>%
  modify_unit("eric",      eric_units[12],     "move","E5") %>%
  modify_unit("eric",      eric_units[15:18],   "soar","I4") %>% # transport 
  modify_unit("eric",      eric_units[19],   "move","G6") %>%
  modify_unit("eric",      eric_units[20],   "move","E6") %>%
  modify_unit("eric",      eric_units[21],   "move","E4") %>%
  modify_unit("eric",      eric_units[c(22:24, 26)],   "soar", "H3") %>% # transport 
  modify_unit("eric",      eric_units[25],   "move","G8") %>%
  modify_unit("eric",      eric_units[27],   "move","F4") %>%
  modify_unit("eric",      eric_units[28],   "move","F8") %>%
  modify_unit("chris",     chris_units[c(6, 13)],  "move","A2") %>%
  modify_unit("chris",     chris_units[c(5, 7, 8, 12, 23)],  "move","A3") %>%
  modify_unit("chris",     chris_units[1],  "move","A4") %>%
  modify_unit("chris",     chris_units[c(10, 14, 24)],  "move","A6") %>%
  modify_unit("chris",     chris_units[c(3, 9, 17, 18, 22)],  "move","A7") %>%
  modify_unit("chris",     chris_units[2],  "move","A8") %>%
  modify_unit("chris",     chris_units[19],  "move","B10") %>%
  modify_unit("chris",     chris_units[21],  "move","B11") %>%
  modify_unit("chris",     chris_units[c(4, 15)],  "move","B7") %>%
  modify_unit("chris",     chris_units[20],  "move","E1") %>%
  modify_unit("chris",     chris_units[c(11, 16, 25)],  "control","A5") %>%
  reconcile_player_orders()
## All units resolved.

Attempt to reconcile moves.

print(draw_map(game))

knitr::kable(get_map_df(game))
player loc unit_id unit_type action unit_name
chris A2 6 tyranid_warriors move Camila Huang
chris A2 13 ripper_swarms move Jim Corbett
chris A3 5 neurothrope move Gentlemen Assassin
chris A3 7 tyranid_warriors move Jake Hall
chris A3 8 tyranid_warriors move Reagan Castillo
chris A3 12 hormagaunts move Quinn Parker
chris A3 23 biovores move Allison Chavez
chris A4 1 flying_hive_tryant move Mighty Dominator
chris A5 11 termagants control Alice Silva
chris A5 16 hive_guard control Ellie Long
chris A5 25 tyrannocyte control Samuel Huntington Hicks
chris A6 10 genestealers move Michael Fine
chris A6 14 ripper_swarms move Sofia Santos
chris A6 24 biovores move Mark Sims
chris A7 3 broodlord move Jack Antonoff
chris A7 9 genestealers move Amir Little
chris A7 17 maleceptor move Thomas Marquez
chris A7 18 venomthropes move Aurora Bishop
chris A7 22 exocrine move Tyler Bell
chris A8 2 flying_hive_tryant move Sarkastik Warrior
chris B10 19 raveners move Karl Barth
chris B11 21 gargoyles move Chris Evans
chris B7 4 broodlord move Stevie Wonder
chris B7 15 ripper_swarms move Lila Sutton
big_grizz C2 1 ravenwing_talonmaster move Elizabeth Taylor
big_grizz C5 8 tactical_squad move Ian Joseph
big_grizz C5 23 rhino move Gwyneth Paltrow
big_grizz D1 10 ravenwing_bike_squad move Benedict Cumberbatch
big_grizz D1 11 ravenwing_attack_bike move Richard Burton
big_grizz D1 12 ravenwing_attack_bike move Paul Bettany
big_grizz D1 16 ravenwing_apothecary move Scarlett Johansson
big_grizz D4 2 deathwing_captain control Jean Sassoon
big_grizz D4 4 phobos_librarian control Steve Lillywhite
big_grizz D4 7 tactical_squad control Jesse Estrada
big_grizz D4 17 deathwing_terminators control Thomas Hobbes
big_grizz D4 18 deathwing_knights control Frederick Forsyth
chris E1 20 gargoyles move Gilles Deleuze
eric E4 21 canoptek_scarab_swarms move William Holden
eric E5 12 canoptek_scarab_swarms move Will Smith
eric E6 20 canoptek_scarab_swarms move Wicked Madman
eric E7 1 trazyn_the_infinite move Alexis Ramirez
eric E7 2 illuminor_szeras move Sophie Burke
eric E7 3 technomancer move Georges Bataille
eric E7 4 lychgaurd move Nicholas Nelson
eric E7 5 skorpekh_destroyers move Diego Norman
eric E7 6 canoptek_plasmacyte move Profound Wizard
eric E7 8 canoptek_spyders move Ol’ Dirty Wanderer
eric E7 9 canoptek_spyders move Crazy Dreamer
eric E7 10 cryptothralls move Kenneth Hernandez
eric E7 11 cryptothralls move Natalia Berry
eric E7 13 canoptek_wraiths move Frank Sinatra
eric E7 14 deathmarks move Jimmy Jam & Terry Lewis
eric F4 27 canoptek_scarab_swarms move Vulgar Swami
big_grizz F5 9 infiltrators move Logan Tucker
big_grizz F5 14 redemptor_dreadnought move Brian Weaver
big_grizz F5 15 invictor_tactical_warsuit move The Neptunes
big_grizz F5 19 vindicare_assassin move John Hill
big_grizz F5 20 eliminators move Max Martin
big_grizz F5 21 eradicators move Jack Armstrong
eric F8 28 canoptek_scarab_swarms move Gregory Peck
eric G6 19 immortals move Aubrey Doyle
eric G7 7 immortals control Emily Graham
eric G8 25 immortals move Isabelle Dominguez
big_grizz H2 3 techmarine soar Ashley Bates
big_grizz H2 5 tactical_squad soar Nathan Kelley
big_grizz H2 6 tactical_squad soar Ethan Ortiz
big_grizz H2 13 dreadnought soar Rose Jimenez
big_grizz H2 22 storm_raven soar Method Bastard
eric H3 22 night_scythe soar H G Wells Williamson
eric H3 23 overlord soar Joel Johnson
eric H3 24 royal_warden soar Gabriella Vargas
eric H3 26 necron_warriors soar Lyla Bennett
eric I4 15 night_scythe soar Vin Diesel Weber
eric I4 16 overlord soar Maddox Byrd
eric I4 17 royal_warden soar Hayden Ellis
eric I4 18 necron_warriors soar David Ray
print(draw_map(game, "big_grizz"))

print(draw_map(game, "chris"))

print(draw_map(game, "eric"))

TURN 2

Players change their maps (making orders)

game <- game %>%
  modify_unit("big_grizz", moby_units[1],   "move",  "B4") %>%
  modify_unit("big_grizz", moby_units[7],   "move",  "D2") %>%
  modify_unit("big_grizz", moby_units[6],   "move",  "H5") %>%
  modify_unit("big_grizz", moby_units[c(3, 5, 13, 22)],   "control",  "H2") %>%
  modify_unit("big_grizz", moby_units[c(8, 23)],   "control",  "C5") %>%
  modify_unit("big_grizz", moby_units[9],   "control",  "F5") %>%
  modify_unit("big_grizz", moby_units[c(10:12, 16)],   "move",  "B4") %>%
  modify_unit("big_grizz", moby_units[c(14:15, 19:21)],   "move",  "C5") %>%
  modify_unit("eric",      eric_units[c(1:6, 13:14, 8:11)],   "move",  "E5") %>%
  modify_unit("eric",      eric_units[7],     "move","E7") %>%
  modify_unit("eric",      eric_units[12],     "move","F2") %>%
  modify_unit("eric",      eric_units[c(15,18)],     "control","I4") %>%
  modify_unit("eric",      eric_units[16:17],   "move","I5") %>%
  modify_unit("eric",      eric_units[19],   "control","G6") %>%
  modify_unit("eric",      eric_units[20],   "move","E3") %>%
  modify_unit("eric",      eric_units[21],   "move","A8") %>%
  modify_unit("eric",      eric_units[c(22:24, 26)],   "move","H2") %>%
  modify_unit("eric",      eric_units[25],   "control","G8") %>%
  modify_unit("eric",      eric_units[27],   "move","F5") %>%
  modify_unit("eric",      eric_units[28],   "move","H3") %>%
  modify_unit("chris",     chris_units[c(6)],  "move","A4") %>%
  modify_unit("chris",     chris_units[c(13)],  "control","A2") %>%
  modify_unit("chris",     chris_units[c(5, 12, 23)],  "move","B2") %>%
  modify_unit("chris",     chris_units[c(7, 8)],  "control","A3") %>%
  modify_unit("chris",     chris_units[1],  "move","A8") %>%
  modify_unit("chris",     chris_units[c(14)],  "control","A6") %>%
  modify_unit("chris",     chris_units[c(10, 24)],  "move","A8") %>%
  modify_unit("chris",     chris_units[c(3,17, 18, 22)],  "move","B9") %>%
  modify_unit("chris",     chris_units[c(9)],  "control","A7") %>%
  modify_unit("chris",     chris_units[2],  "move","E1") %>%
  modify_unit("chris",     chris_units[19],  "move","E1") %>%
  modify_unit("chris",     chris_units[21],  "move","B6") %>%
  modify_unit("chris",     chris_units[c(4)],  "move","B8") %>%
  modify_unit("chris",     chris_units[c(15)],  "move","B9") %>%
  modify_unit("chris",     chris_units[20],  "move","E2") %>%
  modify_unit("chris",     chris_units[11],  "move","B7") %>%
  modify_unit("chris",     chris_units[c(16, 25)],  "control","A5") %>%
  reconcile_player_orders()
## CONFLICT(s):
## Warning: Conflict is at hand! Please resolve territorial disputes.

Attempt to reconcile moves.

print(draw_map(game))

knitr::kable(get_map_df(game))
player loc unit_id unit_type action unit_name
chris A8 1 flying_hive_tryant move Mighty Dominator
chris A8 10 genestealers move Michael Fine
chris A8 24 biovores move Mark Sims
eric A8 21 canoptek_scarab_swarms move William Holden
big_grizz F5 9 infiltrators control Logan Tucker
eric F5 27 canoptek_scarab_swarms move Vulgar Swami
big_grizz H2 3 techmarine control Ashley Bates
big_grizz H2 5 tactical_squad control Nathan Kelley
big_grizz H2 13 dreadnought control Rose Jimenez
big_grizz H2 22 storm_raven control Method Bastard
eric H2 22 night_scythe move H G Wells Williamson
eric H2 23 overlord move Joel Johnson
eric H2 24 royal_warden move Gabriella Vargas
eric H2 26 necron_warriors move Lyla Bennett

Resolve conflicts

# retreats
game <- game %>%
  modify_unit("eric", "F5",   "move","F8") %>%
  kill_unit("eric", eric_units[21]) %>%
  modify_unit("eric", "H2",   "move","H3") %>%
  reconcile_player_orders()
## All units resolved.
print(draw_map(game))

knitr::kable(get_map_df(game))
player loc unit_id unit_type action unit_name
chris A2 13 ripper_swarms control Jim Corbett
chris A3 7 tyranid_warriors control Jake Hall
chris A3 8 tyranid_warriors control Reagan Castillo
chris A4 6 tyranid_warriors move Camila Huang
chris A5 16 hive_guard control Ellie Long
chris A5 25 tyrannocyte control Samuel Huntington Hicks
chris A6 14 ripper_swarms control Sofia Santos
chris A7 9 genestealers control Amir Little
chris A8 1 flying_hive_tryant move Mighty Dominator
chris A8 10 genestealers move Michael Fine
chris A8 24 biovores move Mark Sims
chris B2 5 neurothrope move Gentlemen Assassin
chris B2 12 hormagaunts move Quinn Parker
chris B2 23 biovores move Allison Chavez
big_grizz B4 1 ravenwing_talonmaster move Elizabeth Taylor
big_grizz B4 10 ravenwing_bike_squad move Benedict Cumberbatch
big_grizz B4 11 ravenwing_attack_bike move Richard Burton
big_grizz B4 12 ravenwing_attack_bike move Paul Bettany
big_grizz B4 16 ravenwing_apothecary move Scarlett Johansson
chris B6 21 gargoyles move Chris Evans
chris B7 11 termagants move Alice Silva
chris B8 4 broodlord move Stevie Wonder
chris B9 3 broodlord move Jack Antonoff
chris B9 15 ripper_swarms move Lila Sutton
chris B9 17 maleceptor move Thomas Marquez
chris B9 18 venomthropes move Aurora Bishop
chris B9 22 exocrine move Tyler Bell
big_grizz C5 8 tactical_squad control Ian Joseph
big_grizz C5 23 rhino control Gwyneth Paltrow
big_grizz C5 14 redemptor_dreadnought move Brian Weaver
big_grizz C5 15 invictor_tactical_warsuit move The Neptunes
big_grizz C5 19 vindicare_assassin move John Hill
big_grizz C5 20 eliminators move Max Martin
big_grizz C5 21 eradicators move Jack Armstrong
big_grizz D2 7 tactical_squad move Jesse Estrada
big_grizz D4 2 deathwing_captain control Jean Sassoon
big_grizz D4 4 phobos_librarian control Steve Lillywhite
big_grizz D4 17 deathwing_terminators control Thomas Hobbes
big_grizz D4 18 deathwing_knights control Frederick Forsyth
chris E1 2 flying_hive_tryant move Sarkastik Warrior
chris E1 19 raveners move Karl Barth
chris E2 20 gargoyles move Gilles Deleuze
eric E3 20 canoptek_scarab_swarms move Wicked Madman
eric E5 1 trazyn_the_infinite move Alexis Ramirez
eric E5 2 illuminor_szeras move Sophie Burke
eric E5 3 technomancer move Georges Bataille
eric E5 4 lychgaurd move Nicholas Nelson
eric E5 5 skorpekh_destroyers move Diego Norman
eric E5 6 canoptek_plasmacyte move Profound Wizard
eric E5 8 canoptek_spyders move Ol’ Dirty Wanderer
eric E5 9 canoptek_spyders move Crazy Dreamer
eric E5 10 cryptothralls move Kenneth Hernandez
eric E5 11 cryptothralls move Natalia Berry
eric E5 13 canoptek_wraiths move Frank Sinatra
eric E5 14 deathmarks move Jimmy Jam & Terry Lewis
eric E7 7 immortals move Emily Graham
eric F2 12 canoptek_scarab_swarms move Will Smith
big_grizz F5 9 infiltrators control Logan Tucker
eric F8 27 canoptek_scarab_swarms move Vulgar Swami
eric G6 19 immortals control Aubrey Doyle
eric G8 25 immortals control Isabelle Dominguez
big_grizz H2 3 techmarine control Ashley Bates
big_grizz H2 5 tactical_squad control Nathan Kelley
big_grizz H2 13 dreadnought control Rose Jimenez
big_grizz H2 22 storm_raven control Method Bastard
eric H3 22 night_scythe move H G Wells Williamson
eric H3 23 overlord move Joel Johnson
eric H3 24 royal_warden move Gabriella Vargas
eric H3 26 necron_warriors move Lyla Bennett
eric H3 28 canoptek_scarab_swarms move Gregory Peck
big_grizz H5 6 tactical_squad move Ethan Ortiz
eric I4 15 night_scythe control Vin Diesel Weber
eric I4 18 necron_warriors control David Ray
eric I5 16 overlord move Maddox Byrd
eric I5 17 royal_warden move Hayden Ellis
eric NA 21 canoptek_scarab_swarms NA William Holden
print(draw_map(game, "big_grizz"))

print(draw_map(game, "chris"))

print(draw_map(game, "eric"))